import { FC } from 'react';

// props的数据检查需要用interface
interface PropType {
  name: string;
  onFn: (n: number) => void;
}

// const Child = (props: PropType) => {
//   return <div>child组件 - {props.name}</div>;
// };

const Child: FC<PropType> = (props) => {
  return <div>child组件 - {props.name}</div>;
};

export default Child;
